#include <wx/wx.h>

#include "Memory.h"
#include "CPU.h"
#include "Assembler.h"

class GeminiGUIApp:public wxApp
{
public:
	virtual bool OnInit ();
};

DECLARE_APP (GeminiGUIApp)

class GeminiGUIFrame:public wxFrame
{
private:
	wxButton *nextbutton, *stepbutton, *contbutton;
    wxTextCtrl 	*acctext, *atext, *btext, *temptext,
				*martext, *mdrtext, *pctext, *irtext, 
				*cctext;
	wxListBox *listbox;
	wxStaticText *hittext, *bintext, *misstext;
	CPU *cpu;
	
	enum {
		ID_NEXT_BUTTON = 1000,
		ID_STEP_BUTTON,
		ID_CONT_BUTTON,
		ID_FILE_EXECUTE,
		ID_FILE_BUILD_EXECUTE,
		ID_FILE_EXIT
	};
	
	DECLARE_EVENT_TABLE();
	
public:
	GeminiGUIFrame (const char *szAppName);
	~GeminiGUIFrame ();
	
	wxMenuBar* CreateMenuBar ();
	void ExecutionComplete ();
	void UpdateGUI ();
	
	void OnNextButton (wxCommandEvent&);
	void OnStepButton (wxCommandEvent&);
	void OnContinueButton (wxCommandEvent&);
	void OnFileExecute (wxCommandEvent&);
	void OnFileBuildAndExecute (wxCommandEvent&);
	void OnFileExit (wxCommandEvent&);
};
